//teacher.js
//获取应用实例
var httpUtil = require("../../utils/http.js");
var app = getApp()
Page({
  data:{
    teachers:[],
    url:"/pages/teacherDetail/teacherDetail",
    trimg_male: 'http://hyvti.com/20231204/ed1997f4aa1d4d2e9a30f9b2a6c652be.jpg',
    trimg_female:'http://hyvti.com/20231204/b415216c3cdb4e1996d28e1de0f1a478.jpeg'
  },
    /**
   * 生命周期函数--监听页面加载
   */
  onShow: function (options) {
    this.loadTeachers();
  },

  loadTeachers: function(){
    const params = {
      url:  '/api/open/interface/getResult' ,
      method: "POST",
      data: {
        interfaceCode: "SI0003",
        "page":1,
        "size":10
      },
      callBack: (res) => {
        console.log("res",res)
        this.setData({
          teachers: res.data.rows
        });
      }
    };
    httpUtil.request(params,false);
  },
})